# Random stuff 2026 week 21
## Fibonacci.
Consider the Fibonacci relation $f_{n+2} = f_{n} + f_{n+1}$, any two adjacent terms can generate the sequence to the right and to the left. So we now consider all such double-sided infinite Fibonacci sequences over the integers. Can we somehow classify them? Denote this family $\cal F$.
Trivially, if $(0,0)$ is a pair of adjacent terms of some sequence in $\cal F$, then it must be the zero sequence $$
...,0,0,0,0,...
$$
We will identify these double-sided sequences if they are equal, up to a translation in index. That is, the sequence in $\cal F$ that has the pair of adjacent terms $(2,3)$ is the same as the sequence in $\cal F$ with a pair of adjacent terms $(5,8)$.
Question.
Given adjacent pairs $(a,b)$ and $(c,d)$, how do we determine if they give the same sequence in $\cal F$?
Let us seek some ways to discriminate pairs.
Note that $f_{n+2} = f_{n}+f_{n+1}$, so $\gcd(f_{n+1},f_{n+2}) = \gcd(f_{n+1},f_{n})$. So the gcd should remain an invariant for any adjacent pair of terms in a Fibonacci sequence in $\cal F$. So if $\gcd(a,b) \neq gcd(c,d)$, then $(a,b)$ and $(c,d)$ would below to different sequences.
$\def\cvec#1{\begin{pmatrix} #1\end{pmatrix}} \def\mat#1{\begin{pmatrix} #1 \end{pmatrix}}$
Let us write $v_{n} = \cvec {f_{n}\\f_{n+1}}$. Then by the recursive rule we have $$
\mat{0 & 1 \\ 1 & 1} \cvec{f_{n} \\ f_{n+1}} = \cvec{f_{n+1} \\ f_{n+2}}
$$
So if we write $M = \mat{0 & 1 \\ 1 & 1}$, then $Mv_{n} = v_{n+1}$. So to check if $(a,b)$ and $(c,d)$ belong the same sequence, we need to check if $M^{k}\cvec{a\\b} = \cvec{c\\d}$ for some $k$.
Let us define $u_{n} = \mat{v_{n} & v_{n+1}} = \mat{f_{n} & f_{n+1} \\ f_{n+1} & f_{n+2}}$. Then $$
u_{n+1} = Mu_{n}
$$
Then this means $\det(u_{n+1}) = \det(M) \det(u_{n})$. Since $\det(M) = -1$, we see that $$
|\det(u_{n+1})| = |\det(u_{n})|
$$
In other words, $$
D = |f_{n}f_{n+2} - f_{n+1}^{2}|
$$
is an invariant in a Fibonacci sequence in $\cal F$.
So if $(a,b)$ is a pair of adjacent terms, the next term would be $a+b$, so the quantity $D = |a(a+b) - b^{2}| = |a^{2} + ab - b^{2}|$ is constant throughout the sequence.
So if $|a^{2} + ab - b^{2} | \neq |c^{2} +cd - d^{2}|$, then $(a,b)$ and $(c,d)$ belong to different sequences in $\cal F$.
So for a sequence in $\cal F$, if $(a,b)$ is a pair of consecutive terms, then $\gcd(a,b)$ is invariant, and $D = |a^{2} + ab - b^{2}|$ is also invariant.
Random tangent question. Compute $\sum_{n=0}^{\infty} \frac{f_{n}}{2^{n}}$.
Question. If $a,b$ are coprime, then what are the possible values of $|a^{2}+ab-b^{2}|$?
Observation. The sequence in $\cal F$ all has this form: Unless the sequence is constant zero sequence, going to the right is always monotonic of the same sign, and going to the left is eventually alternating in sign.
Proof. If $a,b$ are adjacent terms both of the same sign, then $c = a + b$ the term to the right